﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WebApplication.Controllers
{
    public class NodesController : Controller
    {
        // GET: Nodes
        public ActionResult Index()
        {
            NodeController._nodes.RemoveAll(t => !t.Activ);
            return View("Index",NodeController._nodes.AsEnumerable());
        }

        // GET: Nodes/Details/5
        public ActionResult Details(string id)
        {
           var v= NodeController._nodes.Where(t => t.Id == id).ToList();

            return View("Details",v.Any()?v[0] :null);
        }


    
        
    }
}
